import 'package:app/common/colors.dart';
import 'package:app/common/tool.dart';
import 'package:app/components/base_scaffold_appbar.dart';
import 'package:app/components/mine_webview.dart';
import 'package:app/components/my_webview.dart';
import 'package:app/services/dio_manager.dart';
import 'package:app/utils/hexcolor.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class ManageAboutUs extends StatefulWidget {
  @override
  _ManageAboutUsState createState() => _ManageAboutUsState();
}

class _ManageAboutUsState extends State<ManageAboutUs>
    with TickerProviderStateMixin {
  @override
  void dispose() {
    // TODO: implement dispose
    super.dispose();
  }

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar:BaseAppBar(child: Text('关于我们'),
          preferredSize: Size(Get.width, AppTool.appBarHEIGHT),),
        // AppBar(
        //     leading: IconButton(
        //       onPressed: () {
        //         Get.back();
        //       },
        //       icon: Image.asset(
        //         'images/leftarr.png',
        //         color: Colors.white,
        //         width: 15,
        //         height: 15,
        //       ),
        //     ),
        //     title: const Text(
        //       '关于我们',
        //       style: TextStyle(
        //         color: Colors.white,
        //       ),
        //     ),
        //     backgroundColor: Colors.black), // 就是这里
        body: Container(
            color: HexColor("#EEEEEE"),
            padding: const EdgeInsets.all(5.0),
            child: Column(
              children: [
                Container(
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(8),
                    ),
                    padding: const EdgeInsets.all(24.0),
                    child: Row(
                        mainAxisAlignment: MainAxisAlignment.center,
                        children: [
                          Container(
                              padding: const EdgeInsets.all(12.0),
                              child: Column(
                                children: [
                                  Container(
                                    margin: const EdgeInsets.all(12.0),
                                    child: Row(
                                      children: [
                                        Container(
                                            child: Image.asset(
                                                'images/logo.png',
                                                width: 120,
                                                height: 120))
                                      ],
                                    ),
                                  ),
                                  Container(
                                    margin: const EdgeInsets.only(top: 20),
                                    child: Row(
                                      children: [
                                        Container(
                                            child: Text("DTCloudApp",
                                                style: TextStyle(
                                                    color: HexColor("#4369F1"),
                                                    fontSize: 24,
                                                    fontWeight:
                                                        FontWeight.bold)))
                                      ],
                                    ),
                                  )
                                ],
                              )),
                        ])),
                Container(
                    margin: const EdgeInsets.only(top: 20),
                    decoration: BoxDecoration(
                      color: Colors.white,
                      borderRadius: BorderRadius.circular(8),
                    ),
                    padding: const EdgeInsets.all(2.0),
                    child: Row(children: [
                      Container(
                          width: Get.width - 16,
                          padding: const EdgeInsets.all(2.0),
                          child: Column(
                            crossAxisAlignment: CrossAxisAlignment.start,
                            children: [
                              GestureDetector(
                                  onTap: () {
                                    Get.to(MineWebView('用户协议',
                                        'http://portal.xumengte.com/taro-vue/active/memaifree.html'));
                                  },
                                  child: Container(
                                    height: 44,
                                    margin: const EdgeInsets.all(12),
                                    child: Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceBetween,
                                      children: [
                                        Container(child: const Text("用户协议")),
                                        Container(
                                          child: const Icon(
                                            color: Colors.grey,
                                            Icons.arrow_forward_ios,
                                            size: 21,
                                          ),
                                        )
                                      ],
                                    ),
                                  )),
                              GestureDetector(
                                  onTap: () {
                                    Get.to(MineWebView('开发者信息',
                                        'http://portal.xumengte.com/taro-vue/active/memaifree.html'));
                                  },
                                  child: Container(
                                    height: 44,
                                    margin: const EdgeInsets.all(12),
                                    child: Row(
                                      mainAxisAlignment:
                                          MainAxisAlignment.spaceBetween,
                                      children: [
                                        Container(child: const Text("开发者信息")),
                                        Container(
                                          child: const Icon(
                                            color: Colors.grey,
                                            Icons.arrow_forward_ios,
                                            size: 21,
                                          ),
                                        )
                                      ],
                                    ),
                                  ))
                            ],
                          )),
                    ]))
              ],
            )));
  }
}
